#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
#include<string.h>

void is_prime();
void is_year();
void mul_form();
void init();
void print();
void reverse(int p[], int sz);

int main() {
	//is_prime();
	//is_year();
	//mul_form();
	int arr[] = { 1,2,3 };
	int sz = sizeof(arr) / sizeof(arr[0])-1;
	/*init(arr,sz);*/
	//print(arr, sz);
	reverse(arr, sz);
}

void is_prime() {
	for (int i = 100; i <= 200; i++) {
		int flag = 0;
		for (int j = 2; j <= sqrt(i);j++) {
			if (i % j == 0)
				break;
			else flag=1;
		}
		if (flag == 1) printf("%d ", i);
	}
	return;
}

void is_year() {
	int y;
	while (scanf("%d", &y) != EOF) {
		if (y % 4==0 && y % 100 != 0 || y % 400 == 0)
			printf("yes\n");
		else
			printf("no\n");
	}
	return;
}

void mul_form() {
	int n;
	scanf("%d", &n);
	for (int i = 0; i <= n; i++) {
		for (int j = 0; j <= i; j++) {
			printf("%d*%d=%d ", i, j, i * j);
		}
		printf("\n");
	}
	return;
}

void init(int p[],int sz) {
	for (int i = 0; i <= sz; i++)
		p[i] = 0;
	for (int j = 0; j <= sz; j++)
		printf("%d", p[j]);
	return;
}

void print(int p[],int sz) {
	for (int i = 0; i <= sz; i++) {
		printf("%d", p[i]);
	}
	return;
}

void reverse(int p[],int sz) {
	int left = 0;
	int right = sz;
	while (left <= right) {
		int tmp = p[right];
		p[right] = p[left];
		p[left] = tmp;
		left++;
		right--;
	}
	for (int i = 0; i <= sz; i++) {
		printf("%d", p[i]);
	}
	return;
}